package cmcciot.onenet.nbapi.sdk.api.online;

import cmcciot.onenet.nbapi.sdk.entity.CommonEntity;
import cmcciot.onenet.nbapi.sdk.utils.HttpSendCenter;
import com.alibaba.fastjson.JSONObject;
import okhttp3.Callback;

public class DeleteDeviceOpe extends BasicOpe {

    public DeleteDeviceOpe(String apiKey) {
        super(apiKey);
    }


    @Override
    public JSONObject operation(CommonEntity commonEntity, JSONObject body) {
        return HttpSendCenter.delete(this.apiKey,commonEntity.toUrl());
    }

    @Override
    public void operation(CommonEntity commonEntity, JSONObject body, Callback callback) {
        HttpSendCenter.deleteAsync(this.apiKey, commonEntity.toUrl(), callback);
    }
}
